package com.yourenbang.lingyun.transaction.web.service.impl.yxy;

import com.yourenbang.lingyun.transaction.config.AcmTransactionParams;
import com.yourenbang.lingyun.transaction.web.service.yxy.YxyWithdrawalService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Arrays;

@Slf4j
@Service
public class YxyWithdrawalServiceImpl implements YxyWithdrawalService {

    @Resource
    AcmTransactionParams acmTransactionParams;

    @Override
    public boolean getYxyWithdrawalFlag(String userBaseid) {

        String backList = acmTransactionParams.getWithdrawalBlackList();
        if (Arrays.asList(backList.split(",")).contains(userBaseid)) {
            return false;
        } else {
            return true;
        }
    }

}
